import javax.swing.*;
import javax.swing.event.*;
import java.awt.event.*;
import java.awt.*;
import java.io.*;


public class browseBut implements ActionListener,ClientInterface {
		public void actionPerformed(ActionEvent e) 
		{
				
		JFileChooser filech = new JFileChooser();
		String theLine = "";
		filech.setFileSelectionMode(JFileChooser.FILES_ONLY);
		int result = filech.showOpenDialog(null);
		
		if(result == JFileChooser.CANCEL_OPTION)
		return;
		
		File filename = filech.getSelectedFile();
		if(filename == null || filename.getName().equals(""))
		JOptionPane.showMessageDialog(null,"Invalid File Name","Error",JOptionPane.ERROR_MESSAGE);
		else
		{
				theLine = filename.getPath();
				taf1.setText(theLine);
				//bt2.setEnabled(true);
				
		
		}
    }
}